package com.itbaima.controller;

import com.itbaima.entity.Student;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
public class TestController {

    @Value("${student.name}")
    private String name;

    @Value("${student.age}")
    private Integer age;

    @Value("${student.date}")
    private Date date;

    @Resource
    private Student student3;

    @RequestMapping("/test")
    public String test() {
//        System.out.println(name + "," + age + "," + date);
        System.out.println(student3);
        return "hi";
    }
}
